#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.

require 'rubygems'
require 'rails/commands/server'
require 'rack'

module Rails
    class Server < ::Rack::Server
        def default_options
            super.merge({
                :Port => 3001,
                :environment => (ENV['RAILS_ENV'] || "development").dup,
                :daemonize => false,
                :debugger => false,
                :config => File.expand_path("config.ru"),
                :SSLEnable => true,
                :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
                :SSLPrivateKeyFile => "#{Rails.root}/ssl/server.key",
                :SSLCertificateFile => "#{Rails.root}/ssl/server.crt",
                :SSLCertName => [["CN", WEBrick::Utils::getservername]]
            })
        end
    end
end

APP_PATH = File.expand_path('../../config/application',  __FILE__)
require File.expand_path('../../config/boot',  __FILE__)
require 'rails/commands'

